home *** CD-ROM | disk | FTP | other *** search
/ Echoes of Ireland / Echoes of Ireland.iso / html / page.js < prev    next >
Text File  |  2004-06-10  |  2KB  |  56 lines

  1. function launchSCO(url){
  2.     parent.mainFrame.location = url + "_main.htm";
  3. }
  4.  
  5.  
  6. //purpose: check if there is a value saved in the users tracking disc for the last module launched.
  7. // if there is, return true
  8. function validLastPartViewed(){
  9.     if (parent.bottomFrame.xml_Object.VideoArts.Student.LastPartViewed.ModuleCode._value !=""){
  10.     launchLastPartViewed();
  11.         //return true;
  12.         }else{
  13.         //return false;
  14.         parent.mainFrame.location = "main_menu.htm";
  15.     }
  16. }
  17.  
  18.  
  19. // purpose: to launch the last part viewed from the 'return' page.
  20. function launchLastPartViewed(){
  21. //alert("last part viewed launched");
  22.     // get the value of the last Module launched
  23.     var modulePath = parent.bottomFrame.xml_Object.VideoArts.Student.LastPartViewed.ModuleCode._value;
  24.     
  25.     parent.bottomFrame.switchModules(modulePath);
  26.     
  27.     //alert(modulePath);    
  28.     
  29.     // add the thick/thin suffix
  30.     //modulePath += "_" + parent.bottomFrame.xml_Object.VideoArts.Student.ContentType._value + "/lms_index.htm";
  31.     //launch the SCO
  32.     launchSCO(modulePath);
  33.     // open the pre-menu
  34.     //parent.mainFrame.location = "pre_menu.htm";
  35.     //parent.frames[1].chgTopPage('pre_menu','htm');
  36.     
  37. }
  38.  
  39. // function that finds the images by name and sets them to the appropriate colour 
  40. // if the module has been completed
  41. function initImages(array){
  42.     for (i=0;i<array.length;i++){
  43.      var myCompletionStatus = parent.bottomFrame.getModuleCompletionStatus(array[i]._value);
  44.     if (myCompletionStatus == 'completed'){
  45.             if (eval ("document.img_" + array[i]._value)){
  46.             setImageComplete (array[i]._value);
  47.             }
  48.         }
  49.     }
  50. }
  51.  
  52.  
  53. // function to launch the Video Arts site 
  54. function gotoVideoArts(){
  55.     window.open("http://www.videoarts.co.uk");
  56. }